import {WeaTools} from 'ecCom'

//任务执行条件
export const getTaskCondition = params => {
	return WeaTools.callApi('/api/proj/pctask/taskcondition', 'GET', params);
}

//任务执行列表
export const getTaskExecuteList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskexecute', 'GET', params);
}

//tab查询
export const getTaskTabs = params =>{
	return WeaTools.callApi('/api/proj/pctask/getTaskTabs','GET', params);
}

//任务卡片--任务信息
export const getTaskForm = params => {
	return WeaTools.callApi('/api/proj/pctask/gettaskform', 'GET', params);
}

//任务卡片--编辑保存
export const saveTaskInfo = params => {
	return WeaTools.callApi('/api/proj/pctask/doTaskOperation', 'POST', params);
}

//任务卡片--删除
export const delTask = params => {
	return WeaTools.callApi('/api/proj/pctask/doTaskOperation', 'POST', params);
}

//任务卡片--子任务查询
export const getTaskSubList = params => {
	return WeaTools.callApi('/api/proj/pctask/tasksub', 'GET', params);
}

//任务卡片--子任务查询
export const getTaskSubCondition = params => {
	return WeaTools.callApi('/api/proj/pctask/taskcondition', 'GET', params);
}

//任务卡片--共享设置列表
export const getTaskShareList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskshare', 'GET', params);
}

//任务卡片--共享设置添加
export const addTaskShare = params => {
	return WeaTools.callApi('/api/proj/prjutil/doProjectShareOpt', 'POST', params);
}

//任务卡片--共享设置批量删除
export const delBatchTaskShare = params => {
	return WeaTools.callApi('/api/proj/prjutil/doProjectShareOpt', 'POST', params);
}

//任务卡片--相关流程-文档-客户-资产 reftype=req ，doc, crm , cpt
export const getTaskReference = params => {
	return WeaTools.callApi('/api/proj/pctask/taskreference', 'GET', params);
}

//任务卡片--相关交流--内容
export const getTaskExchange = params => {
	return WeaTools.callApi('/api/proj/pctask/taskdiscuss', 'GET', params);
}

//任务卡片--相关交流--高级搜索
export const getTaskExchangeCondition = params => {
	return WeaTools.callApi('/api/proj/pctask/taskcondition', 'GET', params);
}


//任务卡片--所需 流程-文档  新增，删除  修改
export const doDspTaskRequiredOpt = params => {
	return WeaTools.callApi('/api/proj/pctask/doDspTaskRequiredOpt', 'GET', params);
}

//任务卡片--流程创建
export const addRequiredWF = params => {
	return WeaTools.callApi('/api/proj/pctask/addRequiredWF', 'GET', params);
}

//任务卡片--相关流程-文档 -客户-资产 新增，删除 
export const doDspTaskReferenceOpt = params => {
	return WeaTools.callApi('/api/proj/pctask/doDspTaskReferenceOpt', 'GET', params);
}
//任务卡片--修改记录
export const taskModifyList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskModifyList', 'GET', params);
}

//任务卡片新增阶段联动 获取任务对应的阶段
export const getTaskStage = params => {
	return WeaTools.callApi('/api/proj/pctask/getTaskStage', 'GET', params);
}

//任务日志
export const getTaskLogList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskLogList', 'POST', params);
}

//任务字段日志
export const getTaskFieldLogList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskFieldLogList', 'POST', params);
}

//任务字段详情日志
export const getTaskFieldDetailLogList = params => {
	return WeaTools.callApi('/api/proj/pctask/taskFieldDetailLogList', 'POST', params);
}

//获取批量修改字段
export const getModifySelect = params => {
	return WeaTools.callApi('/api/proj/pctask/getModifySelect', 'POST', params);
}

export const getModifyFields = params => {
	return WeaTools.callApi('/api/proj/remind/getConditionField', 'POST', params);
}

export const submitBatchModify = params => {
	return WeaTools.callApi('/api/proj/pctask/submitBatchModify', 'POST', params);
}